const result = {
  code: 200,
  msg: "ok",
}
const demo = {
  key_name: 'hehe',
  key_code: 'hehe',
  key_status: 0,
}

module.exports = function(req, res) {
  const dict_code = req.body.dict_code
  // const cur_page = req.body.cur_page || 1

  // let r = cur_page * 10 + 1
  let r = Math.floor(Math.random() * 30)
  const list = []
  for (let i = 0; i < r+10; i++) {
    demo.key_name = '呵呵' + i
    demo.key_code = dict_code + i
    list.push(JSON.parse(JSON.stringify(demo)))
  }
  result.list = list
  // result.total = 200
  // result.cur_page = cur_page

  return result
}